import random

from phone import  generate_phone_number
def generate_random_email(length=8, domain=["gmail.com","qq.com"]):
    phones = [generate_phone_number()]
    phone = phones[0][0]
    # 选择随机域名
    random_domain = random.choice(domain)

    # 组合成邮箱地址
    email = f"{phone}@{random_domain}"
    return email

# 使用函数生成一个随机邮箱
random_email = generate_random_email()
print(random_email)
